#include <iostream>
#include "vectorfunctions.h"

void swap_oddFirst(int x[], int l)
{
	int i, j, aux;
	for(i=0;i<l;i++){
		j=0;
		if(x[i]%2!=0)
			while (x[j]%2==0 && j<l)
				++j;
		if(j!=l){
			aux=x[i];
			x[i]=x[j];
			x[j]=aux;
			}
	}
}
int main()
{
	int l, nl;
	int x[100];
	cout<<"Number of elements : ";
	cin>>l;
	readVector(x, l);
	printVector(x, l);
	swap_oddFirst(x, l);
	printVector(x, l);
return 0;
}
